package com.sync.syncmasterdata.product.service.convert;

import com.sync.syncmasterdata.product.entity.u8.InvEx;
import com.sync.syncmasterdata.product.entity.u8.InvFreeContrapose;
import com.sync.syncmasterdata.product.pojo.oa.InventoryForOA;
import com.sync.syncmasterdata.product.service.ConvertInterface;
import org.springframework.stereotype.Service;

/**
 * oa产品对象 转 U8对象扩展字段（自由项）
 */
@Service
public class ProductOAToInvEx implements ConvertInterface<InventoryForOA,InvEx> {

    @Override
    public InvEx convertTo(InventoryForOA oa) {
        InvEx invEx = new InvEx();

        /**
         * 常量
         */
        invEx.setCInvCode(oa.getCunhuobm());
        /**
         * 业务类型
         */
        invEx.setCidefine2(oa.getYewulx());
        /**
         * 产品线
         */
        invEx.setCidefine3(oa.getChanpinx());
        /**
         * 产品组
         */
        invEx.setCidefine4(oa.getChanpinz());
        /**
         * 项目明细(文本)
         */
        invEx.setCidefine5(oa.getXiangmumcwb());
        /**
         * 检测项目号
         */
        invEx.setCidefine6(oa.getJiancexmh());

        return invEx;
    }
}
